//
//  UserRecomEntity.m
//  SXH
//
//  Created by 房 国生 on 15/8/5.
//  Copyright (c) 2015年 lyss. All rights reserved.
//

#import "UserRecomEntity.h"
#import "FindEntity.h"

@implementation UserRecomEntity

- (instancetype)initWithAttributes:(NSDictionary *)attributes {
    
    self = [super init];
    if (!self) {
        return nil;
    }
    
    self.userEntity = [[UserEntity alloc] init];
    self.userEntity = [self.userEntity initWithAttributes:attributes];
    
    NSArray *array  = [attributes valueForKeyPath:@"travelList"];
    self.mutableArrayTravel = [[NSMutableArray alloc] init];
    
    for (NSDictionary* attributes in array) {
        FindEntity *entity = [[FindEntity alloc] init];
        entity = [entity initWithAttributes:attributes];
        [self.mutableArrayTravel addObject:entity];
    }
    
    return self;
}

@end
